#include<iostream>
using namespace std;
const int N = 2e6 + 10;
int n;
typedef long long LL;
const LL mod = 998244353;
int main()
{
	LL ans = 0;
	cin >> n;
	for (int i = 1; i <= n; i++) {
		for (int j = i; j <= n; j += i) {
			ans = (ans + i * j % mod) % mod;
		}
	}
	cout << ans << endl;
	return 0;
}